package com.example.sparkchaindemo.app;

import com.example.sparkchaindemo.service.SparkService;

/**
 * 讯飞功能入口类
 */
public class SparkHelper {
    public static SparkHelper sparkHelper;
    public ApplicationCallback mApplication;
    private String keyword = "";

    public static SparkHelper getInstance() {
        if (sparkHelper == null) {
            sparkHelper = new SparkHelper();
        }
        return sparkHelper;
    }

    public void init(ApplicationCallback callback) {
        mApplication = callback;
    }

    public ApplicationCallback getApplicationCallback() {
        return mApplication;
    }

    public SparkService getGlobalService() {
        return mApplication.getGlobalService();
    }
    public void startSparkService() {
        mApplication.startSparkService();
    }

    public void stopSparkService() {
        mApplication.stopSparkService();
    }

    public void setKeyword(String keyword) {
        this.keyword = keyword;
    }

    public String getKeyword() {
        return keyword;
    }

}
